import os

def fileSize(folderName):
    size = 0

    for root, dirs, files in os.walk(folderName):
        for dir in dirs:
            size += fileSize(os.path.join(root,dir))
        size += sum([os.path.getsize(os.path.join(root,name)) for name in files])
        return size

if __name__ == '__main__':
    folderName = input("folder path:")
    filesize = fileSize(folderName)
    print("{0} size: {1}".format(folderName, filesize))
